import { http } from "./http";
import type {
  RescovidT,
  WxLoginT,
  CancelAppTimeT,
  ReshpvT,
  HpvPriceT,
  HpvCancelT,
  NucFormT,
  nuatacancelT,
  patientFromT,
  imgUpT,
  graphicsT,
  phyqueryT,
  phydateilT,
  resphyT,
  phycancelT,
  reglistT,
  timeseleT,
  everydlistT,
  video_listT,
  depressionT,
} from "../types/type";
const api = {
  // 首页数据接口
  frontpage: () => http({ url: "/frontpage", method: "GET", data: {} }),
  // 预约时间接口
  newapptime: () => http({ url: "/newapptime", method: "GET", data: {} }),
  // /rescovid
  rescovid: (data: RescovidT) =>
    http({ url: "/rescovid", method: "POST", data: data }),
  // 登录

  login: (data: WxLoginT) =>
    http({ url: "/wx_login", method: "POST", data: data }),

  // 新冠疫苗预约订单 GET /coviduser_order
  coviduser_order: () =>
    http({ url: "/coviduser_order", method: "GET", data: {} }),
  // 取消新冠疫苗预约 GET /covidcancel?query=
  covidcancel: (data: CancelAppTimeT) =>
    http({ url: "/covidcancel", method: "GET", data: data }),
  // HPV疫苗列表   GET   /otuhpv
  otuhpv: () => http({ url: "/otuhpv", method: "GET", data: {} }),
  // 提交HPV疫苗预约     POST    /reshpv
  reshpv: (data: ReshpvT) =>
    http({ url: "/reshpv", method: "POST", data: data }),
  // HPV疫苗套餐    GET /hpv_pack
  hpv_pack: () => http({ url: "/hpv_pack", method: "GET", data: {} }),
  // 查询HPV套餐价格     POST    /hpv_price
  hpv_price: (data: HpvPriceT) =>
    http({ url: "/hpv_price", method: "POST", data: data }),
  // HPV疫苗预约订单    GET    /hpvuser_order
  hpvuser_order: () => http({ url: "/hpvuser_order", method: "GET", data: {} }),
  // 取消HPV预约     GET  /hpvcancel?query=
  hpvcancel: (data: HpvCancelT) =>
    http({ url: "/hpvcancel", method: "GET", data: data }),
  // 获取核酸检测页面数据   GET   /nuataget
  nuataget: () => http({ url: "/nuataget", method: "GET", data: {} }),
  // 提交核酸检测预约     POST    / resnuata
  resnuata: (data: NucFormT) =>
    http({ url: "/resnuata", method: "POST", data: data }),
  // 核酸检测订单   GET    /nuatauser_order
  nuatauser_order: () =>
    http({ url: "/nuatauser_order", method: "GET", data: {} }),
  // 取消核酸检测预约   GET    /nuatacancel?query=
  nuatacancel: (data: nuatacancelT) =>
    http({ url: "/nuatacancel", method: "GET", data: data }),
  //提交就诊人     POST / patient_res
  patient_res: (data: patientFromT) =>
    http({ url: "/patient_res", method: "POST", data: data }),
  // 获取就诊人信息   GET /get_patient
  get_patient: () => http({ url: "/get_patient", method: "GET", data: {} }),
  // 图片上传接口   GET    /upload_picture
  upload_picture: (data: imgUpT) =>
    http({ url: "/upload_picture", method: "GET", data: data }),
  // 提交图文咨询    POST  /graphics
  graphics: (data: graphicsT) =>
    http({ url: "/graphics", method: "POST", data: data }),
  // 获取体检筛选条件    GET  /phyterm
  phyterm: () => http({ url: "/phyterm", method: "GET", data: {} }),
  // 获取全部体检套餐    GET  /physget
  physget: () => http({ url: "/physget", method: "GET", data: {} }),
  // 筛选体检套餐    POST  /phyquery
  phyquery: (data: phyqueryT) =>
    http({ url: "/phyquery", method: "POST", data: data }),
  //体检套餐详情 GET  /phydateil?query=
  phydateil: (data: phydateilT) =>
    http({ url: "/phydateil", method: "GET", data: data }),
  // 体检预约提交    POST  /resphy
  resphy: (data: resphyT) =>
    http({ url: "/resphy", method: "POST", data: data }),
  // 获取体检套餐订单    GET  /phyuser_order
  phyuser_order: () => http({ url: "/phyuser_order", method: "GET", data: {} }),
  // 取消预约体检 get /phycancel
  phycancel: (data: phycancelT) =>
    http({ url: "/phycancel", method: "GET", data: data }),
  // 获取父科室列表  GET  /department
  department: () => http({ url: "/department", method: "GET", data: {} }),
  // .获取父科室下的子科室  GET  /reglist?query=
  reglist: (data: reglistT) =>
    http({ url: "/reglist", method: "GET", data: data }),
  // 获取选择医生的日期  GET  /timesele?query=
  timesele: (data: timeseleT) =>
    http({ url: "/timesele", method: "GET", data: data }),
  // 获取选择的科室下的全部医生列表    GET    /alldlist?query=
  alldlist: (data: timeseleT) =>
    http({ url: "/alldlist", method: "GET", data: data }),
  // 根据时间筛选挂号医生  GET   /everydlist?query=
  everydlist: (data: everydlistT) =>
    http({ url: "/everydlist", method: "GET", data: data }),
  // 获取每个用户的挂号记录   GET   /user_registrat
  user_registrat: () =>
    http({ url: "/user_registrat", method: "GET", data: {} }),
  // GET /regist_cancel?query=
  regist_cancel: (data: phycancelT) =>
    http({ url: "/regist_cancel", method: "GET", data: data }),
  //获取短视频数据 GET  /video_list?query=
  video_list: (data: video_listT) =>
    http({ url: "/video_list", method: "GET", data: data }),
  // 获取抑郁症题目  GET  /depression_topics
  depression_topics: () =>
    http({ url: "/depression_topics", method: "GET", data: {} }),
  // 抑郁症测试结果  GET  /depression?query=
  depression: (data: depressionT) =>
    http({ url: "/depression", method: "GET", data: data }),
  // 获取早泄题目  GET  /depression_topics
  premature_topics: () =>
    http({ url: "/premature_topics", method: "GET", data: {} }),
  // 早泄测试结果  GET  /depression?query=
  premature: (data: depressionT) =>
    http({ url: "/premature", method: "GET", data: data }),
  // 获取失眠题目  GET  /depression_topics
  insomnia_topics: () =>
    http({ url: "/insomnia_topics", method: "GET", data: {} }),
  // 失眠测试结果  GET  /depression?query=
  insomnia: (data: depressionT) =>
    http({ url: "/insomnia", method: "GET", data: data }),
};
export { api };
